import React, { Component } from "react";

class View extends Component {
  constructor(props) {
    super(props);
  }
  oParent() {
    this.props.callback("text内容");
  }
  render() {
    return (
      <React.Fragment>
        <input
          type="button"
          value="点击"
          onClick={() => {
            this.oParent();
          }}
        />
      </React.Fragment>
    );
  }
}

export default View;
